
package SSF.OS;

import com.renesys.raceway.SSF.*; 

class Condition extends Entity {
  private inChannel fromSelf;
  private outChannel toSelf;
  public Condition() {
     fromSelf = new inChannel(this);  	
     toSelf = new outChannel(this,1);  	// one-tick delay
     toSelf.mapto(fromSelf);
  }	
  public void block(process current) {current.waitOn(fromSelf);}
  public void signal() {toSelf.write(new Event(){});}
}


/*=                                                                      =*/
/*=  Copyright (c) 1997--2000  SSF Research Network                      =*/
/*=                                                                      =*/
/*=  SSFNet is open source software, distributed under the GNU General   =*/
/*=  Public License.  See the file COPYING in the 'doc' subdirectory of  =*/
/*=  the SSFNet distribution, or http://www.fsf.org/copyleft/gpl.html    =*/
/*=                                                                      =*/
